package com.peng.sell.enums;

/**
 * 状态码
 */
public enum ResponseCodeEnum {
    SUCCESS(0,"SUCCESS"),
    ERROR(1,"ERROR"),
    NEED_LOGIN(10,"NEED_LOGIN"),
    PRODUCT_NOT_EXIST(2,"商品不存在"),
    PRODUCT_STOCK_NOT_ENOUGH(3,"商品库存不足"),
    ORDER_NOT_EXIST(4,"没有此订单"),
    ORDER_DETAIL_NOT_EXIST(5,"订单没有详情页"),
    ORDER_STATUS_ERR(6,"订单状态错误"),
    ORDER_UPDATE_FAILED(7,"订单更新失败"),
    ORDER_PAY__FAILED(8,"支付状态错误"),
    PARAM_ERROR(9,"参数错误"),
    CART_EMPTY(10,"购物车不能为空"),
    ORDER_OWNER_ERROR(11,"该订单不是当前用户的"),
    WECHAT_MP_ERROR(12,"微信账号方面错误"),
    WXPAY_NOTIFY_MONEY_VERIFY_ERROR(13,"支付通知金额与订单实际金额不符"),
    ORDER_CANCEL_SUCCESS(14,"订单取消成功"),
    ORDER_FINISH_SUCCESS(15,"订单完成成功"),
    PRODUCT_ON_SALE_SUCCESS(16,"商品上架成功"),
    PRODUCT_OFF_SALE_SUCCESS(17,"商品下架成功"),
    PRODUCT_STATUS_ERROR(18,"商品状态错误"),
    LOGIN_FAIL(19,"登录信息错误"),
    LOGOUT_SUCCESS(19,"退出登录成功"),

    ;


    private final int code;
    private final String desc;

    ResponseCodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public int getCode() {

        return code;
    }

    public String getDesc() {
        return desc;
    }


}
